<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      >

    <body>

        <ui:composition template="./../AdminTemplate.xhtml">

            <ui:define name="queryandcss">
                <link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen" title="default" />
            </ui:define>

            <ui:define name="content">
                <h3>
                    <h:link outcome="RoomType" value="Back" styleClass="button"  />
                </h3>
                <h:form id="form" enctype="multipart/form-data"> 
                    <div class="CusdivRegis">

                        <p:panel id="panel" style="border: none;background: transparent;padding: 0px;margin: 0px;border: none;">  
                            <table style="padding-left: 50px;font-size: 13px;">
                                <tbody>
                                    <tr style="padding-top: 5px;">
                                        <td colspan="3">
                                            <h3 style="font-size: 15px;">
                                                Create Flat Type
                                            </h3>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 150px;">
                                          Room TypeName	
                                        </td>
                                        <td>
                                            <p:inputText id="typeName" value="#{roomTypeBean.typeName}" >  
                                                <f:validateLength minimum="2" />  
                                                <p:ajax update="msgtypeName" event="keyup" /> 
                                            </p:inputText>
                                        </td>
                                        <td>
                                            <p:message for="typeName" id="msgtypeName" display="icon"/>    
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 150px;">
                                            Price
                                        </td>
                                        <td>
                                            <p:inputText id="price" value="#{roomTypeBean.price}" required="true" label="Username">  
                                                <f:validateLength minimum="2" />  
                                                <p:ajax update="msgprice" event="keyup" /> 
                                            </p:inputText>  
                                        </td>
                                        <td>
                                            <p:message for="price" id="msgprice" display="icon"/>     
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td colspan="2">
                                            <p:commandButton value="Reset" type="reset" />  
                                            <p:commandButton  value="Save" update="panel" actionListener="#{roomTypeBean.createAllRoomType()}" />  
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <p:messages id="msgs"/>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </p:panel>
                    </div>

                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
